home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>109</cardCount>
- <cardID>18406</cardID>
- <listID>12517</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>256</width>
- <height>292</height>
- </cardSize>
- <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
- Audio Help
- Version 2.3.6
-
- ©Copyright 1987-1997 by Apple Computer,Inc.
- All Rights Reserved.
-
- THE MESSAGE HANDLERS USED IN THIS SCRIPT:
- openStack,closeStack,resumeStack,suspendStack,help,createHelpMenu,
- deleteHelpMenu,setLocationCheckMark,resetHelpGlobal,storeHelpInfo,
- leaveHelp,goOverview,goBalloons,goMainTopics,goContent,goCard,goGray,
- storeMostRecentCard,selectWholeLine,checkForMissingFonts,saveSelection,
- checkSaveSelect,apClose,openCard,closeCard,openField,apOpenStack,
- apCloseStack,apHelp,apInvoke,resetAPMenus,apSave,apBeginEdit,
- apBeginWaveEdit,apEndWaveEdit,startSound,UpdateProtoScripts,
- annoteInstall,normalInstall,UpdateAnnoteMenus,apDelVNote,apHideNotes,
- apShowNotes,apAddMemo,resetAPButtons,PlayAllMemos
-
- THE FUNCTION HANDLERS USED IN THIS SCRIPT:
- menuItems,menuCommands,getHelpInfo,stackIsBeingUsed,realTopicName,
- truncateName,checkIfAppointments,checkIfAddresses,computeMemoLoc,
- buttonAlreadyThere,cardHasSounds,isSoundButton,firstSoundButton,
-
- ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
-
- ------•• SYSTEM MESSAGES ••------
-
- on openStack
- APopenStack -- for the Audio Palette
- if stackIsBeingUsed() then pass openStack
- set cursor to watch
- checkForMissingFonts -- Check to see that necessary fonts are available.
- createHelpMenu -- Create the Help menu for this stack.
- resetHelpGlobal -- Empty out the stack's global variable.
- storeMostRecentCard -- Store the most recent card, so it can be returned to.
- show groups -- Put a gray underline under the grouped text.
- pass openStack
- end openStack
-
- on closeStack
- apCloseStack -- for the Audio Palette
- if stackIsBeingUsed() then pass closeStack
- set cursor to watch
- send resetMainTopicsCard to card 1
- resetHelpGlobal
- deleteHelpMenu
- hide groups
- pass closeStack
- end closeStack
-
- on resumeStack
- set cursor to watch
- APopenStack -- for the Audio Palette
- if stackIsBeingUsed() then pass resumeStack
- createHelpMenu
- show groups
- send "setCheckMark true" to this card
- pass resumeStack
- end resumeStack
-
- on suspendStack
- apCloseStack -- for the Audio Palette
- if stackIsBeingUsed() then pass suspendStack
- deleteHelpMenu
- pass suspendStack
- end suspendStack
-
- on help theTopic
- put "HyperCard Help" into theStack --∆
- put "Audio Help" into AudioHelp --∆
- go stack theStack in a new window -- try in a new window
- if the result = "Cancel" then
- go stack AudioHelp in a new window
- exit help
- else if the result ≠ empty then
- go stack theStack
- end if
- if short name of this stack is theStack then findInTitle theTopic -- in the help stack
- end help
-
- ------•• SCRIPTS FOR HANDLING THE HELP MENU ••------
-
- on createHelpMenu
- -- Create the stack-specific menu.
- global AudioHelpMenu
- put "Topics" into AudioHelpMenu -- ∆ name of stack-specific menu
- -- Remove any existing menus that might have the same name.
- deleteHelpMenu
- create menu AudioHelpMenu
- put menuItems() into menu AudioHelpMenu with menuMsg menuCommands()
- -- Disable the menu item "Print Topic"
- disable menuItem 6 of menu AudioHelpMenu
- end createHelpMenu
-
- function menuItems
- -- Return the menu items for the stack-specific menu.
- return "Main Topics,Content,Quick View,Overview,-,Print Topic" -- ∆
- end menuItems
-
- function menuCommands
- -- Return the menu commands for the stack-specific menu.
- return "goMainTopics,goContent,goBalloons,goOverview,,printTopic"
- end menuCommands
-
- on deleteHelpMenu
- global AudioHelpMenu
- if there is a menu AudioHelpMenu then delete menu AudioHelpMenu
- end deleteHelpMenu
-
- on setLocationCheckMark whichItem,boolean
- -- Set a check mark to indiate the current location.
- -- whichItem is an integer, the menu item that you want to check
- -- or uncheck.
- -- whichItem is true or false depending on whether you want to
- -- check or uncheck the menu item.
- global AudioHelpMenu
- if there is no menu AudioHelpMenu then
- createHelpMenu
- end if
- if there is a menuItem whichItem in menu AudioHelpMenu then
- set checkMark of menuItem whichItem of menu AudioHelpMenu to boolean
- end if
- end setLocationCheckMark
-
- ------•• SCRIPTS FOR HANDLING THE HELP GLOBAL ••------
-
- on resetHelpGlobal
- global AudioHelpInfo
- put empty into AudioHelpInfo
- end resetHelpGlobal
-
- on storeHelpInfo lineNumber,theValue
- -- Use this handler to put a value into the global AudioHelpInfo.
- -- lineNumber is an integer, the line number of the
- -- global you want to put the value into. theValue is the value
- -- you want to store in the global.
- global AudioHelpInfo
- put theValue into line lineNumber of AudioHelpInfo
- end storeHelpInfo
-
- function getHelpInfo lineNumber
- -- Use this hanlder to get a value from the AudioHelpInfo global.
- -- lineNumber is an integer, the line number of the
- -- global that you want to return.
- global AudioHelpInfo
- return line lineNumber of AudioHelpInfo
- end getHelpInfo
-
- ------•• SCRIPTS FOR BASIC NAVIGATION ••------
-
- on leaveHelp
- -- This handler is called when you click the Leave Help button in
- -- either background.
- put getHelpInfo(1) into theCard -- path of the return card
- if theCard is empty then put "Home" into theCard
- go theCard
- end leaveHelp
-
- on goOverview
- -- Go to the Overview card.
- put the name of this card into cardName
- put realTopicName() into topicName
- goCard "Overview"
- end goOverview
-
- on goBalloons
- -- Go to the Quick View card.
- put the name of this card into cardName
- put realTopicName() into topicName
- goCard "Quick View"
- end goBalloons
-
- on goMainTopics
- -- Go to the first main topics card.
- go first card
- end goMainTopics
-
- on goContent
- -- Go to the Content background
- go bkgnd "Content"
- end goContent
-
- on goCard cardName
- -- Go to a card by name, making sure to truncate the name
- -- to 28 chars. All card names are already truncated.
- -- cardName is the short name of the card you want to go to.
- set cursor to watch
- if cardName is empty then exit goCard
- wait 5
- go card truncateName(cardName)
- if the result is not empty then
- -- The requested card wasn't found.
- get the result
- beep
- answer it && quote & cardName & quote & "."
- exit goCard
- end if
- if the mouse is down then exit goCard -- trap double click
- end goCard
-
- on goGray
- -- You clicked on one of the gray navigation buttons.
- beep
- end goGray
-
- ------•• GENERAL MESSAGE HANDLERS ••------
-
- on storeMostRecentCard
- -- This handler stores the most recent card in a global, so you
- -- can return to it when you click the "Leave Help" button.
- push recent card
- pop card into theCard
- storeHelpInfo 1,theCard -- path of the return card
- end storeMostRecentCard
-
- on selectWholeLine N,theField,nextN
- -- This handler selects a whole line of text, including the final
- -- return character, in the field.
- -- N is an integer, the number of the line you want to select.
- -- theField is a complete field record as in “the target,” not just
- -- the field name.
- -- if you want to select more than one line, put the line number into
- -- nextN.
- if nextN is empty then put N into nextN
- put line N to nextN of the value of theField into theText
- if theText is not empty then
- put (number of chars of line 1 to nextN of the value of theField) + 1 ¬
- into endChar
- select empty
- do "select char (endChar - length(theText)) to endChar of" ¬
- && theField
- end if
- end selectWholeLine
-
- on menuReset
- global IsaSoundStack,invokeMItem,helpMItem,HCEditMenuItems
- if last menuItem of menu 3 is "-" then delete last menuItem of menu 3
- if there is not a menuItem invokeMItem in menu 3 then
- put return into cr
- put "-"&cr&invokeMItem&cr&helpMItem after¬
- menu 3 with menuMsgs cr&"APinvoke"&cr&"APhelp"
- end if
- put menu 3 into HCEditMenuItems
- if IsASoundStack then UpdateAnnoteMenus
- if there is a menuitem helpMItem in menu 3 then
- set the checkmark of menuItem helpMItem in menu 3 to¬
- (the name of this stack = the name of me)
- end if
- if (the name of this stack = the name of me) then
- CreateHelpMenu
- send "setCheckMark true" to this card
- end if
- pass menuReset
- end menuReset
-
- ----- Font Adjustment Scripts: ----------------------------------
-
- on checkForMissingFonts
- -- check to see if the fonts needed for this stack are
- -- installed in the system. Inform the user if they're not.
- global APFontsChecked
- if APFontsChecked is not empty then exit checkForMissingFonts -- already been here.
- put "fonts checked." into APFontsChecked
- put empty into missing
- if not FontExists("Palatino",12) then put "Palatino 12" & return after missing --∆
- if not FontExists("Palatino",14) then put "Palatino 14" & return after missing --∆
- if not FontExists("Helvetica",18) then put "Helvetica 18" & return after missing --∆
- if missing is empty then exit checkForMissingFonts
- beep
- answer "These font(s) are missing from your system:" & ¬
- return & return & missing & return & "For text to display correctly"¬
- && "in the Audio Help stack, make sure you have installed these fonts." -- ∆
- end checkForMissingFonts
-
- ------•• GENERAL FUNCTION HANDLERS ••------
-
- function stackIsBeingUsed
- -- If Audio Help is being used by the active stack, then return true.
- return not (the name of this stack is the name of me)
- end stackIsBeingUsed
-
- function realTopicName
- -- Return the actual name of the current topic even if
- -- the user is on a “continued” card.
- if there is not a bkgnd field "Pages" then return empty
- -- ∆ This routine depends on "Card X of Y" format in the field
- put word 2 of bkgnd field "Pages" into currentPage
- get the number of this card
- put bkgnd field "Title" ¬
- of card (it - currentPage + 1) into topicName
- if number of lines in topicName > 1 then
- delete line 2 of topicName
- put "…" after topicName -- ∆
- end if
- if number of chars in topicName > 19 then
- put char 1 to 19 of topicName into topicName
- if "…" is not in topicName then put "…" after topicName -- ∆
- end if
- return topicName
- end realTopicName
-
- function truncateName theText
- -- Removes spaces from a card name, truncates it, and removes
- -- any spaces again. You should set the name of all the cards with
- -- this function.
- get the number of words in theText
- put word 1 to it of theText into theCard
- return char 1 to 28 of theCard
- end truncateName
-
- ------•• SCRIPTS FOR HANDLING THE AUDIO PALETTE ••------
-
- --system message handlers
- on saveSelection
- global SaveSelect,SaveLine,SaveLoc
- put empty into saveSelect
- CheckSaveSelect
- end saveSelection
-
- on CheckSaveSelect
- global SaveSelect,SaveLine,SaveLoc
- if there is a field "notes" then put the number of field "notes" into NoteField
- get the selectedChunk
- if it is not empty and "message box" is not in it and ¬
- word 6 to 8 of it is not "bkgnd field" && NoteField then
- put it into SaveSelect
- put the selectedLine into SaveLine
- put the selectedLoc into SaveLoc
- set the textstyle of SaveSelect to bold
- end if
- end CheckSaveSelect
-
- on apClose
- global SaveSelect,InvokeMItem
- if saveSelect ≠ empty then
- if the textstyle of saveSelect is bold then set the textstyle of saveSelect to plain
- end if
- pass apClose
- end apClose
-
- on openCard
- global IsASoundStack
- if not IsASoundStack then pass openCard
- set the cursor to watch
- resetAPButtons
- pass openCard
- end openCard
-
- on closeCard
- global IsASoundStack,saveSelect
- if not IsASoundStack then pass closeCard
- if saveSelect ≠ empty then
- if the textstyle of saveSelect is bold then set the textstyle of saveSelect to plain
- put empty into saveSelect
- end if
- pass closeCard
- end closeCard
-
- on openField
- global IsASoundStack, saveSelect
- if not IsASoundStack then pass openField
- if saveSelect ≠ empty then
- -- get the selectedChunk
- set the textstyle of saveSelect to plain
- -- if it is not empty and "message box" is not in it and "notes" is not in it
- -- then put empty into saveSelect
- put empty into saveSelect
- end if
- pass openField
- end openField
-
- on apOpenStack
- global IsASoundStack
- put (CheckIfAppointments() or CheckIfAddresses()) into IsASoundStack
- resetAPMenus
- if there is a window "AudioPalette"
- then send "update" to window "AudioPalette" --rebuild sound pop-up
- end apOpenStack
-
- function CheckIfAppointments
- -- also makes sure the Appointments stack has been modified
- -- to pass openCard, which is something we need.
- if not (there is a bg ID 2603) then return false -- faster than "is not a"
- if "resetAPButtons" is not in the script of bg ID 2603 then return false
- if "pass openCard" is not in the script of bg ID 21753 then
- put script of bg ID 21753 into TheScript
- get number of lines in char 1 to offset(return & "end openCard",TheScript)¬
- of TheScript
- if it = 0 then return true
- put return & "pass openCard" after line it of TheScript
- set the script of bg ID 21753 to TheScript
- end if
- return true
- end CheckIfAppointments
-
- function CheckIfAddresses
- if not (there is a bg ID 3664) then return false -- faster than "is not a"
- if "resetAPButtons" is not in the script of bg ID 3664 then return false
- else return true
- end CheckIfAddresses
-
- on apCloseStack
- global APMenuName, memoMItem,delMItem,¬
- showMItem,hideMItem,IsASoundStack
- if there is a menuItem hideMItem in menu 3 then
- delete menuItem hideMItem from menu 3
- else if there is a menuItem showMItem in menu 3 then
- delete menuItem showMItem from menu 3
- end if
- if there is a menuItem delMItem in menu 3 then
- delete menuItem delMItem from menu 3
- end if
- if there is a menuItem memoMItem in menu 3 then
- delete menuItem memoMItem from menu 3
- end if
- put false into IsASoundStack
- end apCloseStack
-
- --menu message handlers
- on DoMenu theItem,theMenu
- global APHasEdit
- if APHasEdit is true then -- have to say "is true" because it may not be defined
- if word 1 of theItem is in "Undo,Cut,Copy,Paste,Clear" then --∆
- send word 1 of theItem to window "AudioPalette"
- exit doMenu
- end if
- end if
- pass DoMenu
- end DoMenu
-
- on apHelp
- global helpMItem
- go stack helpMItem in a new window
- get the result
- if it is "Cancel" then exit apHelp
- if it ≠ empty then go stack helpMItem
- end apHelp
-
- on apInvoke
- global InvokeMItem
- if there is not a window "AudioPalette" then AudioPalette
- else show window "AudioPalette" -- to bring to the front of the windoid layer
- end apInvoke
-
- on resetAPMenus
- global memoMItem,invokeMItem,helpMItem,IsASoundStack
- if (":" & helpMItem & return) is not in (the stacksInUse & return) then
- start using stack helpMItem
- StartSound
- end if
-
- if IsASoundStack then UpdateAnnoteMenus
-
- if there is a menuitem helpMItem in menu 3 then
- set the checkmark of menuItem helpMItem in menu 3 to¬
- (the name of this stack = the name of me)
- end if
- end resetAPMenus
-
- on apSave fileName
- global IsASoundStack
- set the cursor to watch
- if IsASoundStack then annoteInstall fileName
- else normalInstall fileName
- end apSave
-
- on apBeginEdit
- global SaveSelect, SaveLine, SaveLoc
-
- put "Undo" into menuitem 1 of menu 3 --∆
- put "-" into menuitem 2 of menu 3 --∆
- put "Cut" into menuItem 3 of menu 3 --∆
- put "Copy" into menuItem 4 of menu 3 --∆
- put "Paste" into menuItem 5 of Menu 3 --∆
- put "Clear" into menuItem 6 of menu 3 --∆
- set cmdChar of menuitem 1 of menu 3 to "Z" --∆
- set cmdChar of menuItem 3 of menu 3 to "X" --∆
- set cmdChar of menuItem 4 of menu 3 to "C" --∆
- set cmdChar of menuItem 5 of menu 3 to "V" --∆
-
- if SaveSelect is not empty then exit apBeginEdit
- get the SelectedChunk
- if there is a field "notes" then put the number of field "notes" into NotesField
- if it is empty or "message box" is in it or ¬
- word 6 to 8 of it = "bkgnd field" && NotesField then exit apBeginEdit
- put it into SaveSelect
- put the selectedLine into SaveLine
- put the selectedLoc into SaveLoc
- set the textstyle of SaveSelect to bold
- end apBeginEdit
-
- on apBeginWaveEdit
- global HCEditItems,APEditingItems,APEditingItemMsgs, ¬
- SaveSelect, SaveLine, SaveLoc, APHasWaveEdit
-
- if SaveSelect is empty then
- CheckSaveSelect
- end if
-
- if SaveSelect is not empty then set the textStyle of SaveSelect to bold
-
- put true into APHasWaveEdit
-
- put "Undo" into menuitem 1 of menu 3 --∆
- put "-" into menuitem 2 of menu 3 --∆
- put "Cut Sound" into menuitem 3 of menu 3 --∆
- put "Copy Sound" into menuitem 4 of menu 3 --∆
- put "Paste Sound" into menuitem 5 of menu 3 --∆
- put "Clear Sound" into menuitem 6 of menu 3 --∆
-
- set cmdChar of menuitem 1 of menu 3 to "Z" --∆
- set cmdChar of menuitem 3 of menu 3 to "X" --∆
- set cmdChar of menuitem 4 of menu 3 to "C" --∆
- set cmdChar of menuitem 5 of menu 3 to "V" --∆
-
- if there is a menuItem "Select All" of menu 3 then exit apBeginWaveEdit --∆
-
- put "-,Select All,View All" after menuitem 6 of menu 3 with ¬ --∆
- menuMsgs "-,send SelectAll to window AudioPalette," &¬
- "send ViewAll to window AudioPalette"
-
- set cmdChar of menuitem 8 of menu 3 to "A" --∆
- set cmdChar of menuitem 9 of menu 3 to "S" --∆
- end apBeginWaveEdit
-
- on apEndWaveEdit
- global HCEditMenuItems, APHasWaveEdit
- put false into APHasWaveEdit
- put "Undo" into menuitem 1 of menu 3 --∆
- put "-" into menuitem 2 of menu 3 --∆
- put "Cut" into menuItem 3 of menu 3 --∆
- put "Copy" into menuItem 4 of menu 3 --∆
- put "Paste" into menuItem 5 of Menu 3 --∆
- put "Clear" into menuItem 6 of menu 3 --∆
- set cmdChar of menuitem 1 of menu 3 to "Z" --∆
- set cmdChar of menuItem 3 of menu 3 to "X" --∆
- set cmdChar of menuItem 4 of menu 3 to "C" --∆
- set cmdChar of menuItem 5 of menu 3 to "V" --∆
- if there is not a menuItem "Select All" of menu 3 then exit apEndWaveEdit --∆
- repeat 3
- delete menuitem 7 of menu 3
- end repeat
- end apEndWaveEdit
-
- --other handlers
-
- on startSound
- global SaveSelect,hideMItem,protoApptBtnScript,protoNormalBtnScript,¬
- memoMItem,delMItem,showMItem,APMenuName,invokeMItem,helpMItem,¬
- IsASoundStack,HCEditMenuItems
- put (CheckIfAppointments() or CheckIfAddresses()) into IsASoundStack
- put empty into Saveselect
- put "Edit" into APMenuName --∆ name of menu AudioPallete uses
- put "Audio..." into invokeMItem --∆ item which launches AP
- put "Audio Help" into helpMItem --∆ item which opens help stack
- put "Add Audio Memo" into memoMItem --∆ item which adds a memo
- put "Delete Audio Memo…" into delMItem --∆ item which deletes memo
- put "Hide Audio Memos" into hideMItem --∆ item which hides memos
- put "Show Audio Memos" into showMItem --∆ item which shows memos
- if last menuItem of menu 3 is "-" then delete last menuItem of menu 3
- if there is not a menuItem invokeMItem in menu 3 then
- put return into cr
- put "-"&cr&invokeMItem&cr&helpMItem after¬
- menu 3 with menuMsgs cr&"APinvoke"&cr&"APhelp"
- end if
-
- put menu 3 into HCEditMenuItems
-
- set the cursor to watch
- lock screen
- set lockmessages to true
- push card
- go stack helpMItem
- put the script of bg btn "ProtoApptbtn" into protoApptBtnScript
- put the script of bg btn "ProtoNormalbtn" into protoNormalBtnScript
- pop card
- set lockmessages to false
- unlock screen
- end startSound
-
- on UpdateProtoScripts
- global protoApptBtnScript,protoNormalBtnScript
- put the script of bg btn "ProtoApptbtn" into protoApptBtnScript
- put the script of bg btn "ProtoNormalbtn" into protoNormalBtnScript
- end UpdateProtoScripts
-
- on annoteInstall fileName
- global SaveSelect, protoApptBtnScript, SaveLine, SaveLoc
- if SaveSelect is empty then
- CheckSaveSelect
- end if
- if the first char of fileName is quote then
- delete the last char of fileName
- delete the first char of fileName
- end if
- put fileName & return & "AP Button" into NewBtnName
- put protoApptBtnScript into btnscript
- get number of words in char 1 to offset("putSoundNameHere",btnScript) of btnScript
- put quote & fileName & quote into word it of btnscript
- if there is a button NewBtnName then
- if SaveSelect is not empty then
- put ComputeMemoLoc(NewBtnName) into InstallLoc
- set loc of btn NewBtnName to InstallLoc
- if not the visible of btn NewBtnName then show btn NewBtnName
- end if
- else
- put ComputeMemoLoc() into InstallLoc
- lock screen
- get the userlevel
- set the userlevel to 5
- domenu "New Button"
- choose browse tool
- set the userlevel to it
- put the ID of last btn into btnID
- set the name of btn ID btnID to NewBtnName
- set height of btn ID btnID to 17
- set width of btn ID btnID to 20
- set the script of btn ID btnID to btnscript
- set the loc of btn ID btnID to InstallLoc
- set the icon of btn ID btnID to 29183
- set the showname of btn ID btnID to false
- set the style of btn ID btnID to opaque
- set the autoHilite of btn ID btnID to false
- unlock screen
- end if
- if saveSelect is not empty then
- set the textstyle of saveSelect to plain
- put empty into SaveSelect
- end if
- UpdateAnnoteMenus
- if the visible of btn NewBtnName then
- repeat 4
- wait 10
- set the hilite of btn NewBtnName to not the hilite of btn NewBtnName
- end repeat
- end if
- put "To move your button, hold down the option key and drag." --∆
- end annoteInstall
-
- function ComputeMemoLoc TargetButton
- global SaveSelect, SaveLine, SaveLoc
- if SaveSelect is empty then
- put "10,28" into InstallLoc
- else
- put (word 4 to 6 of saveLine) into thisFieldName
- if the ID of this bg is 3664 then
- if the first word of the short name of thisFieldName is "Phone" then
- put 29 into leftOffset
- put 7 into vertOffset
- else
- put 10 into leftOffset
- put 11 into vertOffset
- end if
- else
- put 24 into leftOffset
- put 2 into vertOffset
- end if
- put (the left of thisFieldName) - leftOffset into item 1 of installLoc
- put (item 2 of saveLoc) - (the textHeight of thisFieldName DIV 2) into item 2 of installLoc
- end if
- if not CardHasSounds() then return installLoc
- put the number of btns into NumBtns
- put installLoc = "10,28" into WasInCorner
- put installLoc into OriginalLoc
- put true into FoundOne
- put empty into BtnInChain
- repeat until not FoundOne
- put false into FoundOne
- repeat with count = 1 to NumBtns
- if not IsSoundButton(count) then next repeat
- if installLoc is within the rect of btn count then
- put true into FoundOne
- if WasInCorner then
- repeat until ButtonAlreadyThere(installLoc) = 0
- add 9 to item 1 of installLoc
- add 9 to item 2 of installLoc
- if installLoc is not within the rect of this cd then subtract 9 from item 2 of installLoc
- end repeat
- else
- if BtnInChain is empty then put the short name of btn count into BtnInChain
- if TargetButton is not empty then
- if installLoc = the loc of btn TargetButton then return InstallLoc
- end if
- repeat until ButtonAlreadyThere(installLoc) = 0
- add 8 to item 2 of installLoc
- if item 2 of installLoc + 8 > the height of this cd then
- subtract 8 from item 2 of installLoc
- add 5 to item 1 of installLoc
- end if
- if TargetButton is not empty then
- if installLoc = the loc of btn TargetButton then return InstallLoc
- end if
- end repeat
- end if
- end if
- end repeat
- end repeat
- if WasInCorner then return installLoc
- if BtnInChain is not empty then
- set cursor to arrow
- answer "Do you want to replace the old audio memo with the new one?" with¬ --∆
- "No" or "Yes" --∆
- set cursor to watch
- if it is "No" then return InstallLoc --∆
- else
- lock screen
- send "deleteMe noSound" to btn BtnInChain
- return OriginalLoc
- end if
- end if
- return InstallLoc
- end ComputeMemoLoc
-
- function ButtonAlreadyThere theLoc
- if not CardHasSounds() then return 0
- put the number of btns into NumBtns
- repeat with i = 1 to NumBtns
- if not IsSoundButton(i) then next repeat
- if theLoc is within the rect of btn i then return i
- end repeat
- return 0
- end ButtonAlreadyThere
-
- on normalInstall fileName
- global helpMItem, protoNormalBtnScript, lastButton
- put FALSE into noNewButton
- put empty into prevBtn
- lock screen
- put filename into it
- if char 1 of fileName = quote then
- delete the first char of filename
- delete the last char of filename
- end if
- put "Play" && filename into newName --∆
- repeat with i = 1 to the number of btns
- get the short name of btn i
- if it is newName then
- put TRUE into noNewButton
- exit repeat
- end if
- if the first word of it is "Play" then --∆
- put it into prevBtn
- end if
- end repeat
- if not noNewButton then
- get the userlevel
- set the userlevel to 5
- doMenu "New Button"
- set the userlevel to it
- -- set attributes of new button
- set showName of last card button to true
- set name of last card button to newName
- set autoHilite of last card button to false
- get length(newName)
- set width of last card button to (it * 8)
-
- put protoNormalBtnScript into btnScript
- get number of words in char 1 to offset("putSoundNameHere",btnScript) of btnScript
- put quote & fileName & quote into word it of btnscript
-
- set the script of the last card button to btnScript
- --get the loc of the last card button
- if prevBtn is not empty then
- get the loc of cd btn prevBtn
- add 4 to item 1 of it
- add 16 to item 2 of it
- if it is within rect of this cd then set the loc of last card button to it
- else
- set the left of last btn to 0
- set the top of last btn to 0
- end if
- end if
- end if
- choose browse tool
- unlock screen
- if the visible of btn NewName then
- repeat 4
- wait 10
- set the hilite of btn NewName to not the hilite of btn NewName
- end repeat
- end if
- put "To move your button, hold down the option key and drag." --∆
- end normalInstall
-
- on UpdateAnnoteMenus
- global memoMItem,delMItem,showMItem,hideMItem
- -- First, make sure the menu is there...
- if there is not a menuItem memoMItem in menu 3 then
- put memoMItem & return & delMItem & return & hideMItem after ¬
- menu 3 with menuMsgs "APAddMemo,APDelVNote,APHideNotes"
- end if
-
- disable menuItem delMItem of menu 3
- get FirstSoundButton()
- if it > 0 then
- -- handle hide/show item
- if the visible of btn it then
- put hideMItem into last menuItem of menu 3 with menuMsg APHideNotes
- else
- put showMItem into last menuItem of menu 3 with menuMsg APShowNotes
- end if
- enable last menuItem of menu 3
- -- handle delete item
- put number of btns into NumBtns
- repeat with i = it to NumBtns
- if IsSoundButton(i) then
- if the hilite of btn i then
- if the visible of btn i then
- enable menuItem delMItem of menu 3
- exit repeat
- end if
- end if
- end if
- end repeat
- else
- disable last menuItem of menu 3
- end if
- set the enabled of menuItem memoMItem of menu 3 to ¬
- the ID of this bg is in "2603,3664"
- end upDateAnnoteMenus
-
- on apDelVNote
- set cursor to watch
- put the number of btns into NumBtns
- get 0
- repeat with i = 1 to NumBtns
- if not IsSoundButton(i) then next repeat
- if the hilite of btn i then add 1 to it
- end repeat
- if it = 1 then put "Delete the selected sound?" into thePrompt --∆
- else put "Delete the" && it && "selected sounds?" into thePrompt --∆
- answer thePrompt with "No" or "Yes" --∆
- if it is "No" then exit apDelVNote --∆
- set cursor to watch
- lock screen
- repeat with i = NumBtns down to 1
- set cursor to busy
- if not IsSoundButton(i) then next repeat
- if the hilite of btn i then send "deleteMe" to btn i
- end repeat
- unlock screen
- resetAPMenus
- end apDelVNote
-
- on apHideNotes
- get number of btns
- if it = 0 then exit apHideNotes
- lock screen
- repeat with i = it down to 1
- if not IsSoundButton(i) then next repeat
- hide btn i
- end repeat
- unlock screen
- updateAnnoteMenus
- end apHideNotes
-
- on apShowNotes
- get number of btns
- if it = 0 then exit apShowNotes
- lock screen
- repeat with i = 1 to it
- if not IsSoundButton(i) then next repeat
- show btn i
- end repeat
- unlock screen
- updateAnnoteMenus
- end apShowNotes
-
- on apAddMemo
- global SaveSelect
- saveSelection
- if there is a window AudioPalette then
- send "save" to window AudioPalette
- else
- AudioPalette
- if not (there is a window "AudioPalette") then
- if saveSelect is not empty then set the textstyle of saveSelect to plain
- end if
- end if
- end apAddMemo
-
- on resetAPButtons --sent by buttons in appointments and addresses
- global memoMItem,delMItem,showMItem,hideMItem
- if not (there is a field "notes") then exit resetAPButtons
- if the visible of field "notes" then
- APHideNotes
- else
- APShowNotes
- end if
- end resetAPButtons
-
- on PlayAllMemos
- get the number of btns
- if it is 0 then exit PlayAllMemos
- repeat with i = 1 to it
- set the hilite of btn i to true
- play line 1 of the short name of btn i
- repeat until the sound is done
- set the hilite of btn i to not the hilite of btn i
- if the mouseclick then
- set the hilite of btn i to false
- exit PlayAllMemos
- end if
- wait 15
- end repeat
- set the hilite of btn i to false
- end repeat
- UpdateAnnoteMenus
- end PlayAllMemos
-
- function CardHasSounds
- if the number of btns = 0 then return false
- get the number of btns
- repeat with i = 1 to it
- if IsSoundButton(i) then return true
- end repeat
- return false
- end CardHasSounds
-
- function IsSoundButton theNumber
- return line 2 of the short name of btn theNumber = "AP Button"
- end IsSoundButton
-
- function FirstSoundButton
- if the number of btns = 0 then return 0
- get the number of btns
- repeat with i = 1 to it
- if IsSoundButton(i) then return i
- end repeat
- return 0
- end FirstSoundButton</script>
- <background id="7507" file="background_7507.xml" name="Main Topics" />
- <background id="13784" file="background_13784.xml" name="Content" />
- <background id="20640" file="background_20640.xml" name="Ancillary" />
- <card id="18406" file="card_18406.xml" marked="false" name="" owner="7507" />
- <card id="22632" file="card_22632.xml" marked="false" name="" owner="7507" />
- <card id="19850" file="card_19850.xml" marked="false" name="" owner="7507" />
- <card id="21934" file="card_21934.xml" marked="false" name="" owner="7507" />
- <card id="21412" file="card_21412.xml" marked="false" name="" owner="7507" />
- <card id="3523" file="card_3523.xml" marked="false" name="What is the Audio Palette?" owner="13784" />
- <card id="45252" file="card_45252.xml" marked="false" name="" owner="13784" />
- <card id="4993" file="card_4993.xml" marked="false" name="What you need to use Audio P" owner="13784" />
- <card id="11813" file="card_11813.xml" marked="false" name="" owner="13784" />
- <card id="2615" file="card_2615.xml" marked="false" name="" owner="13784" />
- <card id="40982" file="card_40982.xml" marked="false" name="" owner="13784" />
- <card id="4838" file="card_4838.xml" marked="false" name="Opening the Audio Palette" owner="13784" />
- <card id="12218" file="card_12218.xml" marked="false" name="" owner="13784" />
- <card id="8374" file="card_8374.xml" marked="false" name="Audio Palette commands" owner="13784" />
- <card id="31386" file="card_31386.xml" marked="false" name="" owner="13784" />
- <card id="42283" file="card_42283.xml" marked="false" name="" owner="13784" />
- <card id="32320" file="card_32320.xml" marked="false" name="Digital Sound" owner="13784" />
- <card id="4106" file="card_4106.xml" marked="false" name="" owner="13784" />
- <card id="2885" file="card_2885.xml" marked="false" name="" owner="13784" />
- <card id="4394" file="card_4394.xml" marked="false" name="" owner="13784" />
- <card id="6142" file="card_6142.xml" marked="false" name="Sound quality" owner="13784" />
- <card id="6520" file="card_6520.xml" marked="false" name="Sound quality" owner="13784" />
- <card id="43879" file="card_43879.xml" marked="false" name="Managing memory and disk spa" owner="13784" />
- <card id="6367" file="card_6367.xml" marked="false" name="" owner="13784" />
- <card id="32025" file="card_32025.xml" marked="false" name="" owner="13784" />
- <card id="23380" file="card_23380.xml" marked="false" name="" owner="13784" />
- <card id="44283" file="card_44283.xml" marked="false" name="" owner="13784" />
- <card id="25478" file="card_25478.xml" marked="false" name="" owner="13784" />
- <card id="27433" file="card_27433.xml" marked="false" name="" owner="13784" />
- <card id="44669" file="card_44669.xml" marked="false" name="" owner="13784" />
- <card id="8457" file="card_8457.xml" marked="false" name="Adding audio memos to" owner="13784" />
- <card id="15447" file="card_15447.xml" marked="false" name="" owner="13784" />
- <card id="17734" file="card_17734.xml" marked="false" name="" owner="13784" />
- <card id="7986" file="card_7986.xml" marked="false" name="" owner="13784" />
- <card id="15844" file="card_15844.xml" marked="false" name="" owner="13784" />
- <card id="16048" file="card_16048.xml" marked="false" name="" owner="13784" />
- <card id="16197" file="card_16197.xml" marked="false" name="" owner="13784" />
- <card id="15142" file="card_15142.xml" marked="false" name="" owner="13784" />
- <card id="5280" file="card_5280.xml" marked="false" name="Adding sound to your own sta" owner="13784" />
- <card id="23724" file="card_23724.xml" marked="false" name="" owner="13784" />
- <card id="14282" file="card_14282.xml" marked="false" name="" owner="13784" />
- <card id="14444" file="card_14444.xml" marked="false" name="" owner="13784" />
- <card id="22836" file="card_22836.xml" marked="false" name="" owner="13784" />
- <card id="14825" file="card_14825.xml" marked="true" name="" owner="13784" />
- <card id="14851" file="card_14851.xml" marked="false" name="" owner="13784" />
- <card id="7111" file="card_7111.xml" marked="false" name="" owner="13784" />
- <card id="8861" file="card_8861.xml" marked="false" name="Playing sounds" owner="13784" />
- <card id="16558" file="card_16558.xml" marked="false" name="" owner="13784" />
- <card id="16716" file="card_16716.xml" marked="false" name="" owner="13784" />
- <card id="16946" file="card_16946.xml" marked="false" name="" owner="13784" />
- <card id="5462" file="card_5462.xml" marked="false" name="Opening a new sound" owner="13784" />
- <card id="24751" file="card_24751.xml" marked="false" name="" owner="13784" />
- <card id="8996" file="card_8996.xml" marked="false" name="Deleting audio memos" owner="13784" />
- <card id="13565" file="card_13565.xml" marked="false" name="" owner="13784" />
- <card id="31573" file="card_31573.xml" marked="false" name="" owner="13784" />
- <card id="9898" file="card_9898.xml" marked="false" name="Editing tools and the wavefo" owner="13784" />
- <card id="34891" file="card_34891.xml" marked="false" name="" owner="13784" />
- <card id="33359" file="card_33359.xml" marked="false" name="" owner="13784" />
- <card id="33190" file="card_33190.xml" marked="false" name="" owner="13784" />
- <card id="41969" file="card_41969.xml" marked="false" name="" owner="13784" />
- <card id="32767" file="card_32767.xml" marked="false" name="" owner="13784" />
- <card id="33590" file="card_33590.xml" marked="false" name="" owner="13784" />
- <card id="43364" file="card_43364.xml" marked="false" name="" owner="13784" />
- <card id="30704" file="card_30704.xml" marked="false" name="Recording while a sound is o" owner="13784" />
- <card id="33822" file="card_33822.xml" marked="false" name="" owner="13784" />
- <card id="42569" file="card_42569.xml" marked="false" name="" owner="13784" />
- <card id="34163" file="card_34163.xml" marked="false" name="" owner="13784" />
- <card id="34525" file="card_34525.xml" marked="false" name="" owner="13784" />
- <card id="34574" file="card_34574.xml" marked="false" name="" owner="13784" />
- <card id="35320" file="card_35320.xml" marked="false" name="" owner="13784" />
- <card id="35409" file="card_35409.xml" marked="false" name="" owner="13784" />
- <card id="9475" file="card_9475.xml" marked="false" name="Moving a sound" owner="13784" />
- <card id="44418" file="card_44418.xml" marked="false" name="" owner="13784" />
- <card id="38187" file="card_38187.xml" marked="false" name="" owner="13784" />
- <card id="38576" file="card_38576.xml" marked="false" name="" owner="13784" />
- <card id="38740" file="card_38740.xml" marked="false" name="" owner="13784" />
- <card id="35778" file="card_35778.xml" marked="false" name="" owner="13784" />
- <card id="35891" file="card_35891.xml" marked="false" name="" owner="13784" />
- <card id="45359" file="card_45359.xml" marked="false" name="" owner="13784" />
- <card id="36348" file="card_36348.xml" marked="false" name="" owner="13784" />
- <card id="36554" file="card_36554.xml" marked="false" name="" owner="13784" />
- <card id="36772" file="card_36772.xml" marked="false" name="" owner="13784" />
- <card id="37048" file="card_37048.xml" marked="false" name="" owner="13784" />
- <card id="37348" file="card_37348.xml" marked="false" name="" owner="13784" />
- <card id="23242" file="card_23242.xml" marked="false" name="Saving a sound in a differen" owner="13784" />
- <card id="9289" file="card_9289.xml" marked="false" name="" owner="13784" />
- <card id="38961" file="card_38961.xml" marked="false" name="" owner="13784" />
- <card id="25751" file="card_25751.xml" marked="false" name="Deleting sounds" owner="13784" />
- <card id="39393" file="card_39393.xml" marked="false" name="" owner="13784" />
- <card id="39580" file="card_39580.xml" marked="false" name="" owner="13784" />
- <card id="39732" file="card_39732.xml" marked="false" name="" owner="13784" />
- <card id="39984" file="card_39984.xml" marked="false" name="" owner="13784" />
- <card id="37594" file="card_37594.xml" marked="false" name="" owner="13784" />
- <card id="10028" file="card_10028.xml" marked="false" name="Recording level" owner="13784" />
- <card id="27864" file="card_27864.xml" marked="false" name="" owner="13784" />
- <card id="28018" file="card_28018.xml" marked="false" name="" owner="13784" />
- <card id="10466" file="card_10466.xml" marked="false" name="Recording time" owner="13784" />
- <card id="10744" file="card_10744.xml" marked="false" name="Play through" owner="13784" />
- <card id="28545" file="card_28545.xml" marked="false" name="" owner="13784" />
- <card id="11106" file="card_11106.xml" marked="false" name="Auto Record Level" owner="13784" />
- <card id="11482" file="card_11482.xml" marked="false" name="Compression" owner="13784" />
- <card id="29011" file="card_29011.xml" marked="false" name="" owner="13784" />
- <card id="11553" file="card_11553.xml" marked="false" name="Recording Quality" owner="13784" />
- <card id="46355" file="card_46355.xml" marked="false" name="" owner="13784" />
- <card id="28352" file="card_28352.xml" marked="false" name="" owner="13784" />
- <card id="29340" file="card_29340.xml" marked="false" name="Volume Control" owner="13784" />
- <card id="17277" file="card_17277.xml" marked="false" name="Quick View" owner="20640" />
- <card id="7275" file="card_7275.xml" marked="false" name="" owner="20640" />
- <card id="3844" file="card_3844.xml" marked="false" name="Overview" owner="20640" />
- </stack>
-